﻿#pragma once

#include "imgui.h"
#include "imgui_impl_sdl2.h"
#include "imgui_impl_opengl3.h"

#include "SDL2/SDL.h"
#include "glad/glad.h"

#if defined(IMGUI_IMPL_OPENGL_ES2)
#include <SDL_opengles2.h>
#else
#include <SDL_opengl.h>
#endif

class SDL2OpenGLBase
{
private:
    SDL_Window* m_window;
    SDL_GLContext m_glContext;
    
private:
    int __init();
    void __render();

protected:
    virtual int init() = 0;
    virtual int render() = 0;

public:
    SDL2OpenGLBase();
    virtual ~SDL2OpenGLBase();

    void run();
};